<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<?php
/** @var \Magento\Wishlist\Block\Customer\Wishlist\Items $block */
$columns = $block->getColumns();
?>

<div class="products-grid wishlist">
    <?php $iterator = 1; ?>
    <?php if (count($block->getItems())): ?>
    <ol class="product-items">
        <?php foreach ($block->getItems() as $item): ?>
        <?php /* @noEscape */ echo($iterator++ == 1) ? '<li data-row="product-item" class="product-item" id="item_' . $block->escapeHtmlAttr($item->getId()) . '">' : '</li><li class="product-item" id="item_' . $block->escapeHtmlAttr($item->getId()) . '">' ?>
            <div class="product-item-info">
                <?php foreach ($columns as $column): ?>
                    <?php $column->setItem($item); echo $column->toHtml($item);?>
                <?php endforeach; ?>
            </div>
        <?php echo($iterator == count($block->getItems())+1) ? '</li>' : '' ?>
        <?php endforeach; ?>
    </ol>
    <?php else: ?>
        <div class="message info empty">
            <span><?php echo $block->escapeHtml(__('This Wish List has no Items'));?></span>
        </div>
    <?php endif; ?>
</div>

<?php foreach ($columns as $column): ?>
    <?php echo $column->getAdditionalHtml();?>
<?php endforeach; ?>
